# blib/plugs/list.py
#
#

""" lists various stuff. """

## blib imports

from blib import cmnds, core

## list command

def list(event):
    plugs = core.plugins
    plug = plugs.get(event.rest)
    if not plug: event.display("plugins: %s" % ", ".join(plugs.names())) ; return
    try: store = getattr(plug, "store")
    except AttributeError: event.reply("no store available for %s" % event.rest) ; return
    event.display(store)

cmnds.register("list", list)
